<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <span v-if="imgaa">
            <!-- key可以解决虚拟dom -->
            <label for="qoo">用户账户</label>
            <input type="text" id="qoo" placeholder="请输入账号" key="yi">
        </span>
        <span v-else>
            <label for="wi">用户邮箱</label>
            <input type="text" id="wi" placeholder="请输入邮箱"key="re">
        </span>
        <button @click="qq">切换类型</button>
    </div>
    <script src="../../node_modules/vue/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                imgaa: true,
            },
            computed: {

            },
            methods: {
                qq() {
                    this.imgaa = !this.imgaa
                }
            }
        })
    </script>
</body>

</html>